package com.example.concurrent;

import org.springframework.stereotype.Component;

/**
 * @author Houger.
 * @date 2025年01月20日 16:49.
 */
@Component
public class ATemplate extends BaseTemplate {

    public void doSet(String name) {
        this.getContext().setName(name);
    }

    @Override
    protected void upgradeName() {
        String name = Thread.currentThread().getName();
        this.getContext().setName(this.getContext().getName() + "_" + name);
    }
}
